﻿namespace EyeOpen.Market.UI.Web
{
    using System.Collections.Generic;
    using EyeOpen.Commerce.Domain;

    public class MarketService : IMarketService
    {
        private static IList<Customer> customerList;

        public IEnumerable<Customer> GetCustomerList()
        {
            if (customerList != null)
            {
                return customerList;
            }

            customerList = FillCustomerList();

            return customerList;
        }

        private IList<Customer> FillCustomerList()
        {
            var customerCollection = 
                new List<Customer>
                    {
                        new Customer
                            {
                                Id = new System.Guid("496fd090-6308-41f9-b97c-a7c75d69e802"),
                                Name = "Bill",
                                Lastname = "Gates"
                            },
                        new Customer
                            {
                                Id = new System.Guid("9233da47-210d-4696-80bf-77f648f498e2"),
                                Name = "Martin",
                                Lastname = "Fowler"
                            }
                    };

            return customerCollection;
        }
    }
}
